using System;

namespace ElementumForever
{
#if WINDOWS || XBOX
    static class Program
    {

        static MainGame game;
        static bool isEditer = true;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            if (isEditer) {
                MainForm form = new MainForm();
                form.Disposed += new EventHandler(form_Disposed);
                using (game = new MainGame(form))
                {
                    form.Show();
                    game.Run();
                }
            }
            else {
                using (game = new MainGame("test01.lua"))
                {
                    game.Run();
                }
            }
        }

        static void form_Disposed(object sender, EventArgs e)
        {
            game.Exit();
        }
    }
#endif
}

